<ui:composition 
        xmlns="http://www.w3.org/1999/xhtml"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:p="http://primefaces.org/ui"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:c="http://java.sun.com/jsp/jstl/core">
 
    <h1>Controle du stock</h1>
    <div style="border-width: 1px; border-left: 75px; border-right: 75px; border-style: solid;  border-color: #ffffff;">
        <h:form>  
            <p:dataTable id="dataTable" var="book" value="#{livreBean.listOfAllBook}">
                <p:column id="modelHeader" sortBy="#{book.nom}">  
                    <f:facet name="header">  
                        <h:outputText value="Livre" />  
                    </f:facet>  
                    <h:outputText value="#{book.nom}" />  
                </p:column>  

                <p:column sortBy="#{book.stock}">  
                    <f:facet name="header">  
                        <h:outputText value="Stock restant" />  
                    </f:facet>  
                    <h:outputText value="#{book.stock}" />  
                </p:column>  

                <p:column sortBy="#{book.seuil}">  
                    <f:facet name="header">  
                        <h:outputText value="Seuil de commande" />  
                    </f:facet>  
                    <h:outputText value="#{book.seuil}" />  
                </p:column>  

                <p:column sortBy="#{book.nbCommandes}">  
                    <f:facet name="header">  
                        <h:outputText value="Nombre de commandes" />  
                    </f:facet>  
                    <h:outputText value="#{book.nbCommandes}" />  
                </p:column>  
                
                <p:column style="width:3%">  
                    <p:commandButton id="selectButton" icon="ui-icon-search" title="View" action="#{livreBean.go_to_modif_Livre(book)}" />
                </p:column>  
            </p:dataTable>  
        </h:form> 
   </div>
    
</ui:composition>